
How to typeset arabic with xetex and polyglossia (in Windows)
[The accompanying example is borrowed from David Romney]
[See his suggestions: http://scholar.harvard.edu/dromney/arabic-latex]


*****************
* Getting xetex *
*****************

xetex is a version of latex that ships with standard latex packages like MikTex.  

To see if xetex is installed, open a command prompt:
All programs -> Accessories -> Command prompt

then type:  xetex

You should see:  This is XeTeX, Version ...


*****************
* Getting Fonts *
*****************

In the process below, you'll have to specify an Arabic font to use.
You can use any font that you have available in the path

C:\WINDOWS\Fonts

I like Arabic Transparent

Make sure you have something and that you get the name right. 
If you don't, xetex will choke and throw an error.


***********************************
* making a xetex file with arabic *
***********************************

xetex files look just like latex files.  You'll need to specify a few
additional packages -- see the example file below.

There are a few ways to enter arabic.  

The easiest is to use the polyglossia package and type directly into a utf-8
encoded file.  See the accompanying "polyglossiaExample.txt".

Note that at least some Latex editors change the UTF-8 encoding, which
will screw everything up.  I usually use TeXnicCenter for latex editing.

You could also just enter the unicode for each character by hand 
(again, including the space character as well).  It's harder to
enter the arabic but you don't have to worry about making sure that
the file stays encoded in UTF-8, etc.

Unicode(s) available from: http://unicode.org/Public/UNIDATA/ArabicShaping.txt


*************
* Compiling *
*************

I use TeXnicCenter which has a XeTeX -> PDF option.


Alternatively, if you are working from the command line:
1. open a command prompt
2. change the directory to the directory where the .tex file is:

   cd C:\Documents and Settings\Rich\Desktop

3. At the command line, enter (assuming your file is "test.tex":

  xelatex test

4. If your document has citations, follow this up with

  bibtex test

5. If you just ran bibtex, then rerun:

  xelatex test
  xelatex test

  [twice, that's right]

6. Your pdf should be there!


*************
* Resources *
*************

** NOT necessarily in order of helpfulness

* Unicode characters:
http://unicode.org/Public/UNIDATA/ArabicShaping.txt

* A great introduction to xetex
http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf

* A sample file that got me started
http://pokristensson.com/unicodelatex.html

* This helped when I got stuck somewhere
http://www.tug.org/pipermail/xetex/2007-June/006769.html

* The fontspec manual
http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/xetex/latex/fontspec/fontspec.pdf

* The tex code for the manual above
http://www.tex.ac.uk/CTAN/macros/latex2e/contrib/fontspec/fontspec.dtx

* Not arabic related, but has great fonts!
http://www.tug.dk/FontCatalogue/